<!DOCTYPE html>
<html>
  <head>
      <title>手机端后台</title>
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

      <meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">

      <link rel="stylesheet" href="css/weui.css">
      <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.min.css">
      <link rel="stylesheet" href="css/demos.css">
	  <style>
      .placeholder {
        margin: 5px;
        padding: 0 10px;
        background-color: #808080;
        height: 2.3em;
        line-height: 2.3em;
        text-align: center;
        color: #cfcfcf;
      }
     </style>
  </head>

  <body ontouchstart>
    <div class="weui-flex">
      <div class="weui-flex__item"><div class="placeholder">首页</div></div>
    </div>
    <header class='demos-header'style="padding-top: 70px;padding-bottom: 70px;">
      <h1 class="demos-title"> S1601081128</h1>
    </header>

    <div class="weui-grids">
      <a href="./room.php" class="weui-grid js_grid">
        <div class="weui-grid__icon">
          <img src="images/icon_nav_button.png" alt="">
        </div>
        <p class="weui-grid__label">
          选课
        </p>
      </a>

      <a href="./inquire.php" class="weui-grid js_grid">
        <div class="weui-grid__icon">
          <img src="images/icon_nav_cell.png" alt="">
        </div>
        <p class="weui-grid__label">
          查询
        </p>
      </a>
      <a href="message.php" class="weui-grid js_grid">
        <span class="weui-badge" style="position: absolute;top:1em;right: 2em;visibility:hidden;" id="messageCount">0</span>
		<div class="weui-grid__icon">
          <img src="images/icon_nav_cell.png" alt="">
        </div>
        <p class="weui-grid__label">
          消息
        </p>
      </a>
	  
	  <a href="modifyPassword.php" class="weui-grid js_grid">
        <div class="weui-grid__icon">
          <img src="images/icon_nav_cell.png" alt="">
        </div>
        <p class="weui-grid__label">
          修改密码
        </p>
      </a>
	  
      <a href="../studentPhoneLogin/loginPage.html" class="weui-grid js_grid">
        <div class="weui-grid__icon">
          <img src="images/icon_nav_cell.png" alt="">
        </div>
        <p class="weui-grid__label">
          退出
        </p>
      </a>
    </div>
	<div class="weui-footer weui-footer_fixed-bottom">
        <p class="weui-footer__links">
          <a href="https://communal-integral-monster.ngrok-free.app/progect/login.html" class="weui-footer__link">中国计量大学</a>
        </p>
        <p class="weui-footer__text">Copyright © 2018.6.29</p>
     </div>
    <script src="https://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.min.js"></script>
	<script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/swiper.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/city-picker.min.js"></script>
    <script src="js/fastclick.js"></script>
    <script>  
		$(function () {
			FastClick.attach(document.body);
		});
	</script>
	<script>
	      /*   function setCookie(cname,cvalue,exdays){
				  var d = new Date();
				  d.setTime(d.getTime()+(exdays*24*60*60*1000));
				  var expires = "expires="+d.toGMTString();
				  document.cookie = cname + "=" + cvalue + "; " + expires;
		    } */
	
	
	       function getMessage(){
			   var url="./getmessage.php";
			   $.get(url,function(data,status){
				     if(isNaN(data)){
						     document.getElementById("messageCount").innerHTML=data;
						     document.getElementById('messageCount').style.visibility='visible';						 
					 }else{
								 var string=data.toString(); 				 
								 if(string[0] == 0){
									document.getElementById('p1').style.visibility='hidden';
								 }else{
									//var messageID=string.substring(1);
									//alert(messageID);
									//setCookie("messageID",messageID,1620);
									document.getElementById("messageCount").innerHTML=string[0];
									document.getElementById('messageCount').style.visibility='visible'; 
								 } 
					     }
			   });
		    }
	       setInterval("getMessage()",3000);
	
	</script>
  </body>
</html>
